<!doctype html>
<meta charset="utf-8">
<title>CSS test: Calc expressions with numbers should still serialize as calc()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="test"></div>
<script>
var div = document.querySelector('#test');
test(function() {
  div.style.lineHeight = "calc(1)";
  assert_equals(div.style.lineHeight, "calc(1)");
}, "calc of an integer expression should be preserved");

test(function() {
  div.style.lineHeight = "calc(1 + 3)";
  assert_equals(div.style.lineHeight, "calc(4)");
}, "expressions on calc() should be simplified");
</script>
